Termination w.r.t. Q of the following Term Rewriting System could be disproven:
Q restricted rewrite system:
The TRS R consists of the following rules:
zeros → cons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(nil) → 0
length(cons(N, L)) → U11(tt, activate(L))
zeros → n__zeros
activate(n__zeros) → zeros
activate(X) → X
Q is empty.
↳ QTRS
↳ RRRPoloQTRSProof
Q restricted rewrite system:
The TRS R consists of the following rules:
zeros → cons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(nil) → 0
length(cons(N, L)) → U11(tt, activate(L))
zeros → n__zeros
activate(n__zeros) → zeros
activate(X) → X
Q is empty.
The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:
zeros → cons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(nil) → 0
length(cons(N, L)) → U11(tt, activate(L))
zeros → n__zeros
activate(n__zeros) → zeros
activate(X) → X
Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:
length(nil) → 0
Used ordering:
Polynomial interpretation [25]:
POL(0) = 0
POL(U11(x1, x2)) = 2·x1 + 2·x2
POL(U12(x1, x2)) = 2·x1 + 2·x2
POL(activate(x1)) = x1
POL(cons(x1, x2)) = 2·x1 + 2·x2
POL(length(x1)) = 2·x1
POL(n__zeros) = 0
POL(nil) = 1
POL(s(x1)) = x1
POL(tt) = 0
POL(zeros) = 0
↳ QTRS
↳ RRRPoloQTRSProof
↳ QTRS
↳ DependencyPairsProof
Q restricted rewrite system:
The TRS R consists of the following rules:
zeros → cons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(cons(N, L)) → U11(tt, activate(L))
zeros → n__zeros
activate(n__zeros) → zeros
activate(X) → X
Q is empty.
Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:
U121(tt, L) → ACTIVATE(L)
LENGTH(cons(N, L)) → ACTIVATE(L)
U121(tt, L) → LENGTH(activate(L))
U111(tt, L) → U121(tt, activate(L))
U111(tt, L) → ACTIVATE(L)
LENGTH(cons(N, L)) → U111(tt, activate(L))
ACTIVATE(n__zeros) → ZEROS
The TRS R consists of the following rules:
zeros → cons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(cons(N, L)) → U11(tt, activate(L))
zeros → n__zeros
activate(n__zeros) → zeros
activate(X) → X
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
↳ QTRS
↳ RRRPoloQTRSProof
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
U121(tt, L) → ACTIVATE(L)
LENGTH(cons(N, L)) → ACTIVATE(L)
U121(tt, L) → LENGTH(activate(L))
U111(tt, L) → U121(tt, activate(L))
U111(tt, L) → ACTIVATE(L)
LENGTH(cons(N, L)) → U111(tt, activate(L))
ACTIVATE(n__zeros) → ZEROS
The TRS R consists of the following rules:
zeros → cons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(cons(N, L)) → U11(tt, activate(L))
zeros → n__zeros
activate(n__zeros) → zeros
activate(X) → X
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 4 less nodes.
↳ QTRS
↳ RRRPoloQTRSProof
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
Q DP problem:
The TRS P consists of the following rules:
U121(tt, L) → LENGTH(activate(L))
U111(tt, L) → U121(tt, activate(L))
LENGTH(cons(N, L)) → U111(tt, activate(L))
The TRS R consists of the following rules:
zeros → cons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(cons(N, L)) → U11(tt, activate(L))
zeros → n__zeros
activate(n__zeros) → zeros
activate(X) → X
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.
↳ QTRS
↳ RRRPoloQTRSProof
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ Narrowing
Q DP problem:
The TRS P consists of the following rules:
U121(tt, L) → LENGTH(activate(L))
U111(tt, L) → U121(tt, activate(L))
LENGTH(cons(N, L)) → U111(tt, activate(L))
The TRS R consists of the following rules:
activate(n__zeros) → zeros
activate(X) → X
zeros → cons(0, n__zeros)
zeros → n__zeros
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule U121(tt, L) → LENGTH(activate(L)) at position [0] we obtained the following new rules:
U121(tt, n__zeros) → LENGTH(zeros)
U121(tt, x0) → LENGTH(x0)
↳ QTRS
↳ RRRPoloQTRSProof
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
Q DP problem:
The TRS P consists of the following rules:
U111(tt, L) → U121(tt, activate(L))
U121(tt, n__zeros) → LENGTH(zeros)
LENGTH(cons(N, L)) → U111(tt, activate(L))
U121(tt, x0) → LENGTH(x0)
The TRS R consists of the following rules:
activate(n__zeros) → zeros
activate(X) → X
zeros → cons(0, n__zeros)
zeros → n__zeros
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule U121(tt, n__zeros) → LENGTH(zeros) at position [0] we obtained the following new rules:
U121(tt, n__zeros) → LENGTH(cons(0, n__zeros))
U121(tt, n__zeros) → LENGTH(n__zeros)
↳ QTRS
↳ RRRPoloQTRSProof
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
U121(tt, n__zeros) → LENGTH(cons(0, n__zeros))
U121(tt, n__zeros) → LENGTH(n__zeros)
U111(tt, L) → U121(tt, activate(L))
LENGTH(cons(N, L)) → U111(tt, activate(L))
U121(tt, x0) → LENGTH(x0)
The TRS R consists of the following rules:
activate(n__zeros) → zeros
activate(X) → X
zeros → cons(0, n__zeros)
zeros → n__zeros
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.
↳ QTRS
↳ RRRPoloQTRSProof
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ NonTerminationProof
Q DP problem:
The TRS P consists of the following rules:
U121(tt, n__zeros) → LENGTH(cons(0, n__zeros))
U111(tt, L) → U121(tt, activate(L))
LENGTH(cons(N, L)) → U111(tt, activate(L))
U121(tt, x0) → LENGTH(x0)
The TRS R consists of the following rules:
activate(n__zeros) → zeros
activate(X) → X
zeros → cons(0, n__zeros)
zeros → n__zeros
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:
The TRS P consists of the following rules:
U121(tt, n__zeros) → LENGTH(cons(0, n__zeros))
U111(tt, L) → U121(tt, activate(L))
LENGTH(cons(N, L)) → U111(tt, activate(L))
U121(tt, x0) → LENGTH(x0)
The TRS R consists of the following rules:
activate(n__zeros) → zeros
activate(X) → X
zeros → cons(0, n__zeros)
zeros → n__zeros
s = LENGTH(cons(N, n__zeros)) evaluates to t =LENGTH(cons(0, n__zeros))
Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Semiunifier: [ ]
- Matcher: [N / 0]
Rewriting sequence
LENGTH(cons(N, n__zeros)) → U111(tt, activate(n__zeros))
with rule LENGTH(cons(N', L)) → U111(tt, activate(L)) at position [] and matcher [L / n__zeros, N' / N]
U111(tt, activate(n__zeros)) → U111(tt, n__zeros)
with rule activate(X) → X at position [1] and matcher [X / n__zeros]
U111(tt, n__zeros) → U121(tt, activate(n__zeros))
with rule U111(tt, L) → U121(tt, activate(L)) at position [] and matcher [L / n__zeros]
U121(tt, activate(n__zeros)) → U121(tt, n__zeros)
with rule activate(X) → X at position [1] and matcher [X / n__zeros]
U121(tt, n__zeros) → LENGTH(cons(0, n__zeros))
with rule U121(tt, n__zeros) → LENGTH(cons(0, n__zeros))
Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence
All these steps are and every following step will be a correct step w.r.t to Q.